package com.ansion.basedb.database;

import android.content.ContentValues;
import android.database.Cursor;
import android.database.SQLException;

public interface ISqlDataBase {
    void beginTransactionWithListener(final android.database.sqlite.SQLiteTransactionListener transactionListener);

    void setTransactionSuccessful();

    void endTransaction();

    Cursor rawQuery(String sql);

    int update(String table, ContentValues values, String whereClause, String[] whereArgs);

    default void execSQL(String sql) throws SQLException {
        execSQL(sql, null);
    }

    void execSQL(String sql, Object[] bindArgs) throws SQLException;

    int delete(String table, String whereClause, String[] whereArgs);

    long replace(String table, String nullColumnHack, ContentValues initialValues);

    long insert(String table, String nullColumnHack, ContentValues values);
}
